package com.dd.cloud.user.entity.classroom;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.Table;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 媒体内容表
 * </p>
 *
 * @author czg
 * @since 2022-04-27
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@Table(comment = "媒体内容表")
public class MediaContent implements Serializable {

    private static final long serialVersionUID=1L;

    /**
     * 数据表说明:后台管理用户表
     */
    @TableId(value = "id", type = IdType.AUTO)
    @Column(isKey = true,isAutoIncrement = true)
    private Integer id;

    /**
     * 账号
     */
    @Column(comment = "小节id")
    private Integer sectionId;

    /**
     * 视频标题
     */
    @Column(length = 20, comment = "视频标题")
    private String name;

    /**
     * 视频标题
     */
    @Column(length = 100, comment = "视频原始文件名")
    private String mediaName;

    /**
     * 视频播放url
     */
    @Column(length = 64, comment = "视频播放url")
    private String url;

    /**
     * 视频播放url
     */
    @Column(length = 50, comment = "文件路径")
    private String fileUrl;

    /**
     * 简介
     */
    @Column(length = 500, comment = "简介")
    private String introduct;

    /**
     * 简介
     */
    @Column(length = 100, comment = "备注")
    private String remarks;

    /**
     * 累计播放次数
     */
    @Column(comment = "累计播放次数", defaultValue = "0")
    private Integer plays;

    /**
     * 上一次播放位置
     */
    @Column(comment = "总时长(秒值)")
    private Long duration;

    /**
     * 视频大小
     */
    @Column(length = 16, comment = "大小, kb, mb, gb 等可读单位")
    private String size;

    /**
     * 状态 1正常使用 -1禁用,
     */
    @Column(comment = "状态 1正常使用 -1删除, 2下架")
    private Integer status;

    /**
     * 排序
     */
    @Column(comment = "排序")
    private Integer sort;

    /**
     * 创建时间
     */
    @Column(comment = "创建时间", defaultValue = "now()")
    private LocalDateTime createDate;

    /**
     * 更新时间
     */
    @Column(comment = "更新时间", defaultValue = "now()")
    private LocalDateTime updateDate;

    /**
     * 创建人id
     */
    @Column(comment = "创建人id")
    private Integer createId;

    /**
     * 创建人id
     */
    @Column(comment = "编辑人id")
    private Integer updateId;
}
